<template>
  <div class="content-wrap">
    <div class="left-wrap">
      <img class="icon" src="../../../../assets/imgs/person.png" alt />
      <p class="name">{{ userInfo.firstName }} {{ userInfo.lastName }}</p>
      <div class="infoNav">
        <a @click="gopath('/pc/info/index')">{{ $t("vr.personalinfor") }}</a>
        <a @click="gopath('/pc/info/collection')">{{
          $t("vr.mycollection")
        }}</a>
        <a @click="gopath('/pc/info/password')">{{ $t("vr.accoandpass") }}</a>
      </div>
    </div>
    <div class="right-wrap">
      <router-view />
    </div>
  </div>
</template>

<script>
import api from "servicePath/index"
import { mapState, mapMutations } from "vuex"
export default {
  data () {
    return {}
  },
  computed: {
    ...mapState(["lang", "userInfo"])
  },
  mounted () { },
  methods: {
    gopath (url) {
      let r = "/foundation"
      if (this.$route.path.indexOf("/fakuma") >= 0) {
        r = "/fakuma"
      }
      this.$router.push(r + url)
    }
  }
};
</script>

<style lang="scss" scoped>
.content-wrap {
  width: 1190px;
  height: auto;
  min-height: 800px;
  margin: 0 auto;
  display: flex;
  padding: 40px 0;
  .left-wrap {
    width: 300px;
    height: auto;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    background: #fff;
    -moz-box-shadow: 1px 1px 14px 5px #f0f0f0;
    -webkit-box-shadow: 1px 1px 14px 5px #f0f0f0;
    box-shadow: 1px 1px 14px 5px #f0f0f0;
    padding-top: 40px;
    .icon {
      width: 40%;
    }
    .name {
      font-size: 18px;
      font-weight: bold;
      color: #000;
      margin: 10px 0;
    }
    .infoNav {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      margin-top: 30px;
      a {
        width: 80%;
        background: #fff;
        border-radius: 6px;
        border: none;
        -moz-box-shadow: 1px 1px 14px 5px #f0f0f0;
        -webkit-box-shadow: 1px 1px 14px 5px #f0f0f0;
        box-shadow: 1px 1px 14px 5px #f0f0f0;
        padding: 18px 0;
        margin-bottom: 15px;
        font-size: 14px;
        letter-spacing: 1px;
      }
      .router-link-active {
        color: #fa5556;
      }
    }
  }
  .right-wrap {
    width: 840px;
    height: auto;
    margin-left: 50px;
    background: #fff;
    -moz-box-shadow: 1px 1px 14px 5px #f0f0f0;
    -webkit-box-shadow: 1px 1px 14px 5px #f0f0f0;
    box-shadow: 1px 1px 14px 5px #f0f0f0;
    padding: 40px;
  }
}
</style>
